package com.bit.cfdi.web.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;

import com.bit.cfdi.web.dao.RegimenDAO;
import com.bit.cfdi.web.domain.Regimen;
@Service
public class RegimenService {

	@Autowired RegimenDAO regimenDAO;
	
	public Regimen getByDescription(String nombreRegimen) throws DataAccessException {
		return regimenDAO.getByDescription(nombreRegimen);
	}

	public void save(Regimen regimen) throws DataAccessException {
		regimenDAO.save(regimen);
	}

	public List<Regimen> getAll() throws DataAccessException {
		return regimenDAO.getAll();
	}

	public List<Regimen> getByPersonaFiscal(String personaFiscal) throws DataAccessException {
		return regimenDAO.getByPersonaFiscal(personaFiscal);
	}
	
}
